<template>

  <v-app-bar app color="#eee" :elevation="0" :floating="false" :clipped-left="false">

<!--    <v-btn text icon>-->
<!--      <v-icon @click.stop="scanning">mdi-qrcode-scan</v-icon>-->
<!--      &lt;!&ndash; <v-icon>mdi-barcode-scan</v-icon> &ndash;&gt;-->
<!--    </v-btn>-->

    <v-btn text icon>
      <img src="../assets/img/logo_white.png" width="37" alt="logo">
    </v-btn>

    <v-spacer></v-spacer>

    <v-btn text icon>
      <v-icon>mdi-bell</v-icon>
    </v-btn>

    <!-- <v-toolbar-title>云食安</v-toolbar-title> -->
<!--    <v-spacer></v-spacer>-->
<!--    <v-btn icon @click.stop="tastyIndexIconClick">-->
<!--      <v-icon>mdi-home</v-icon>-->
<!--    </v-btn>-->
  </v-app-bar>

</template>

<script>
    /**
     * 顶部工具栏
     * @author Canaan
     * @date 2019/8/9 22:51.
     */
    export default {
        name: 'TopNavigation',
        mounted() {

        },
        components: {},
        props: {},
        data() {
            return {}
        },
        computed: {},
        methods: {
            barNavIconClick() {
                this.$emit("barNavIconClick");
            },
            tastyIndexIconClick() {
                if (this.$route.path !== "/tastyIndex") {
                    this.$router.push('/tastyIndex')
                }
            },
            scanning() {
                this.$android.barCodeScanning('popupInventory', res => {
                    if (res.code === "ok") {

                        this.$router.push({
                            name: 'popupInventoryForm',
                            params: {
                                batchNo: res.data.content
                            }
                        });
                        return;
                    }
                    this.$message.error(res.msg);
                });
            }
        },
        watch: {},
        filters: {},
        beforeDestroy() {

        }
    }

</script>

<style scoped>

</style>
